﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Skyworth.CRM.Service.Entity;
using Skyworth.CRM.Service.IBLL;
using Skyworth.CRM.Service.IDAL;

namespace Skyworth.CRM.BLL
{
   public class PolicySchemeBLL:IPolicySchemeBLL
    {
       private IPolicySchemeDAL _policySchemeDAL;

       public PolicySchemeBLL(IPolicySchemeDAL policySchemeDal)
       {
            _policySchemeDAL = policySchemeDal;
       }

       public void Add(PolicyScheme model)
       {
           _policySchemeDAL.Add(model);
       }

       public void Update(PolicyScheme model)
       {
           _policySchemeDAL.Update(model);
       }

       public DataTable Query(string strWhere, Hashtable parameter)
       {
          return _policySchemeDAL.Query(strWhere, parameter);
       }

       public void Delete(int policyId)
       {
          _policySchemeDAL.Delete(policyId);
       }

       public PolicyScheme GetPolicyById(int policyId)
       {
           return _policySchemeDAL.GetPolicyById(policyId);
       }

       public DataTable GetPoliciesByPage(string strWhere, string strOrderBy, int pageIndex, int pageSize, out int recordCount, out int pageCount)
       {
           return _policySchemeDAL.GetPoliciesByPage(strWhere, strOrderBy, pageIndex, pageSize, out recordCount,
                                                     out pageCount);
       }

       public DataTable QueryPolicyScheme(string strWhere)
       {
           return _policySchemeDAL.QueryPolicyScheme(strWhere);
       }

    }
}
